package com.yuliang;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class Around implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("======== before==========");
        Object proceed = null;
        try {
            proceed = methodInvocation.proceed();
        } catch (Throwable e) {
            System.out.println("========error===========");
        }
        System.out.println("======= after =============");
        return proceed;
    }
}
